//出院病例明细页面
$(function(){ 
	var param = $("#tabContent > .tab-pane.active").data();
	//往后台传递的参数拼接
	var paramPost={  "dateFrom":param.dateFrom,
					"dateTo":param.dateTo,
					"pardepCode":param.depCode  //所选科室编码
				};
	$.post(contextPath + '/DrgFeeMedins/getOutCases.dhc', paramPost).done(function(data) {
		if(data||data.success){
			var data=data.data;
			var columns=[ 
			             	 { 	"data": "MR_NO",title:"病案号"},
				             { "data": "PNAME",title:"姓名" },
				             { "data": "IN_DATE",title:"入院时间"},
				             { "data": "OUT_DATE",title:"出院时间"},
				             { "data": "IN_DAYS",title:"住院日"},
				             { "data": "PAYMENT_DATE",title:"支付日期" },
				             { "data": "TOTAL_COST",title:"总金额(元)", "type":"numeric-comma",
				 				 "render": function(obj, type, full) {
				 						return formatNumber(full.TOTAL_COST);
				 					 }
				             },
				             { "data": "PAYMENT_FOUNDATION",title:"基金支付(元)" , "type":"numeric-comma",
				 				 "render": function(obj, type, full) {
				 						return formatNumber(full.PAYMENT_FOUNDATION);
				 					 }
				             },
				             { "data": "PAYMENT_INDIVIDUAL",title:"个人支付(元)" , "type":"numeric-comma",
				 				 "render": function(obj, type, full) {
				 						return formatNumber(full.PAYMENT_INDIVIDUAL);
				 					 }
				             },
				             { "data": "PROFIT",title:"盈亏(元)", "type":"numeric-comma",
				 				 "render": function(obj, type, full) {
				 						return formatNumber(full.PROFIT);
				 		           }
				 			 },
				             { "data": "DRG_CODE",title:"DRG编码"},
			                 { "data": "DRG_DESC",title:"DRG描述"},
				             { "data": "DRG_COST" ,title:"DRG发生费用(元)", "type":"numeric-comma",
				 				 "render": function(obj, type, full) {
				 						return formatNumber(full.DRG_COST);
				 					 }
				             }
				   ];
			var paramsDataTables={searching:true,ordering:true,stateSave:true,scrollY:'420px',scrollX:true,tableTitle:'' 
				  ,columnDefs:[{"orderable": false,"targets": [ 0 ] }] };
			var dataTable= $("#"+tabId+" #drgFeeMedinsOutCase").dataTableBasic(columns,data,paramsDataTables) ;
		}
	})
})
